export const useSettingStore = defineStore('setting', () => {
  // 判断iOS设备是否授权动作与方向权限
  const granted = ref(false)
  // 系统设置
  const hdLayer = ref(true)

  // 音频播放组件
  const audioShow = ref(false)
  function setAudioShow(val) {
    audioShow.value = val
  }

  // 当前位置
  const currentPosition = ref(null)
  function setCurrentPosition(val) {
    currentPosition.value = val
  }

  // 点位介绍
  const markerInfoShow = ref(false)
  function setMarkerInfoShow(val) {
    markerInfoShow.value = val
  }
  const markerInfo = ref(null)
  function setMarkerInfo(val) {
    markerInfo.value = val
  }

  return {
    granted,
    hdLayer,

    audioShow,
    setAudioShow,

    currentPosition,
    setCurrentPosition,

    markerInfoShow,
    setMarkerInfoShow,

    markerInfo,
    setMarkerInfo,
  }
})
